package de.ghost23.common.process {
	
	/**
	* A Follower maps a specific resultCode to an ICommand-compatible
	* command.
	* @author Sven Busse
	* @version 1.0
	*/
	public class Follower {

		private var _code:String;
		
		private var _command:Class;
		
		/**
		 * Constructs a new Follower for a Step in a Process.
		 * @param	code A code or keyword, that binds this follower to its predecessors result
		 * @param	command The ICommand class reference(!), that should follow on the given code.
		 * Note, this should be a reference to the class directly, not a class instance!
		 */
		public function Follower(code:String, command:Class) {
			_code = code;
			_command = command;
		}
		
		/**
		 * The code or keyword, that binds this follower to its predecessors result
		 */
		public function get code():String {
			return _code;
		}
		
		/**
		 * The ICommand, that should follow on the given code. It is recommended to extend DialogCommand.
		 */
		public function get command():Class {
			return _command;
		}
	}
}